<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://java.sun.com/jsf/facelets"
   xmlns:f="http://java.sun.com/jsf/core"
   xmlns:h="http://java.sun.com/jsf/html"
   template="/WEB-INF/templates/default.xhtml">
   <ui:define name="content">
      <h1>#{IdentityModelBean.header}</h1>
-
      <h:form id="bv">
         <h2>Bean Validation examples</h2>
         <p>Enforces annotation-based constraints defined on the model class.</p>
         <table>
            <tr>
               <th style="text-align: right;">
                  <h:outputLabel for="letters" value="Create a new identity"/>
               </th>
               <td>
               </td>
            </tr>
            <tr>
               <th style="text-align: right;">
                  <h:outputLabel for="firstName" value="firstname"/>
               </th>
               <td>
                  <h:inputText id="firstName" value="#{identityModelBean.firstName}"/>
                  <h:message for="firstName" errorClass="invalid"/>
               </td>
            </tr>
            <tr>
               <th style="text-align: right;">
                  <h:outputLabel for="lastname" value="lastname"/>
               </th>
               <td>
                  <h:inputText id="lastName" value="#{identityModelBean.lastName}"/>
                  <h:message for="lastName" errorClass="invalid"/>
               </td>
            </tr>
            <tr>
               <th style="text-align: right;">
                  <h:outputLabel for="employeeId" value="employee id"/>
               </th>
               <td>
                  <h:inputText id="employeeId" value="#{identityModelBean.employeeId}"/>
                  <h:message for="employeeId" errorClass="invalid"/>
               </td>
            </tr>
         </table>
         <p>
            <h:commandButton id="save" action="save" value="Save"/>
            <h:outputText value=" All clear!" 
                          rendered="#{facesContext.postback and empty facesContext.messageList}" style="color: green;"/>
         </p>
      </h:form>
   </ui:define>
</ui:composition>
